package com.example.JavaDemo.service.impl;



import com.example.JavaDemo.Mapper.BuildingMapper;
import com.example.JavaDemo.domain.Building;
import com.example.JavaDemo.service.IBuildingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BuildingServiceImpl implements IBuildingService {
    @Autowired
    private BuildingMapper buildingMapper;


    /**
     * 查询楼栋
     * @param building
     * @return
     */
    @Override
    public List<Building> selectBuilding(Building building) {
        return buildingMapper.selectBuilding(building);
    }

    /**
     * 新增楼栋
     * @param building
     * @return
     */
    @Override
    public void insertBuilding(Building building) {
        buildingMapper.insertBuilding(building);
    }
    /**
     * 修改楼栋
     * @param building
     * @return
     */
    @Override
    public void updateBuildingById(Building building) {
        buildingMapper.updateBuildingById(building);
    }

    /**
     * 删除楼栋
     * @param id
     * @return
     */
    @Override
    public void delBuildingById(String id) {
        buildingMapper.delBuildingById(id);
    }
}
